var nameInput:TextField;

function init(param, data, slot)
{
	var cont:String=Packages.system.MLF.scanDictionary(Packages.components.ReadingRecorder.recorderMain, "processResult00");
	var hlp:String=Packages.system.MLF.scanDictionary(Packages.components.ReadingRecorder.recorderMain, "recordHelpContent01");
	Packages.components.ReadingRecorder.refreshResultContent(cont, false);
	Packages.components.ReadingRecorder.refreshHelpContent(hlp);

	nameInput=mlf.gatekeeper.native.Caller.scanElement(slot, "readerv");
}

function rolloutCon(param, data, slot)
{
	if (nameInput.text=="") return;
	mlf.mcmanager.PathResolver.extractPath(param+"Bg")._visible=true;
	Packages.system.Platform.highlightBG(mlf.mcmanager.PathResolver.extractPath(param), mlf.gatekeeper.native.Caller.scanElement(slot, "highlightBg"), 0);
}

function rolloverCon(param, data, slot)
{
	if (nameInput.text=="") return;
	mlf.mcmanager.PathResolver.extractPath(param+"Bg")._visible=false;
	Packages.system.Platform.highlightBG(mlf.mcmanager.PathResolver.extractPath(param), mlf.gatekeeper.native.Caller.scanElement(slot, "highlightBg"), 50);
}

function pressCon(param, data, slot)
{
	if (nameInput.text=="") return;
	Packages.system.Platform.highlightBG(mlf.mcmanager.PathResolver.extractPath(param), mlf.gatekeeper.native.Caller.scanElement(slot, "highlightBg"), 100);
}

function releaseCon(param, data, slot)
{
	if (nameInput.text=="") return;
	rolloverCon(param, data, slot);
	var cont:String=Packages.system.MLF.scanDictionary(Packages.components.ReadingRecorder.recorderMain, "processResult01")+nameInput.text+Packages.system.MLF.scanDictionary(Packages.components.ReadingRecorder.recorderMain, "processResult011");
	Packages.components.ReadingRecorder.refreshResultContent(cont, true);
	Packages.task.Composition.username=nameInput.text;
}

function switchDisplayMode(param, data, slot)
{
	var tutorialMedia=mlf.gatekeeper.native.Caller.scanElement(slot, "tutorial");
	var tutorialSpot=mlf.gatekeeper.native.Caller.scanElement(slot, "tutorialSpot");
	var tutorialCtrl=mlf.gatekeeper.native.Caller.scanElement(slot, "tutorCtrl");
	if (tutorialSpot._width!=1000)
	{
		tutorialSpot._width=1000;
		tutorialSpot._x=-300;
		tutorialSpot._height=600;
		tutorialSpot._y=-110;
		tutorialMedia._xscale=100;
		tutorialMedia._yscale=100;
		tutorialMedia._x=-300;
		tutorialMedia._y=-110;
		tutorialCtrl._visible=true;
	}
	else 
	{
		tutorialSpot._width=400;
		tutorialSpot._x=80;
		tutorialSpot._height=240;
		tutorialSpot._y=55;
		tutorialMedia._xscale=40;
		tutorialMedia._yscale=40;
		tutorialMedia._x=80;
		tutorialMedia._y=55;
		tutorialCtrl._visible=false;
	}
}